﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.Core;
using StockTraderRI.Infrastructure.Presenters;
using Caliburn.PresentationFramework.ApplicationModel;
using StockTraderRI.Infrastructure.Interfaces;
namespace StockTraderRI.Modules.Position
{
	public class PositionModule : CaliburnModule
	{

		public PositionModule(IConfigurationHook hook) : base(hook) { }

		protected override IEnumerable<ComponentInfo> GetComponents()
		{
			yield return Singleton(typeof(IAccountPositionService), typeof(Services.AccountPositionService));
		}

		protected override void Initialize()
		{
			var posSummary = ServiceLocator.GetInstance<PositionSummary.IPositionSummaryPresentationModel>();
			ServiceLocator.GetInstance<IShellPresenter>().Open(posSummary);
		}
		  
	}
}
